using System;
using System.Collections.Generic;
using System.Text;
using MacomberMap.Common.Types;
using System.Xml;
using MacomberMap.Common.User_Interfaces.Components;
using System.Data.Common;

namespace MacomberMap.Common.Components
{
    /// <summary>
    /// This class holds information on a breaker
    /// </summary>
    [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.Both)]
    public class MM_Breaker: MM_Element
    {
        #region Variable declarations
        /// <summary>
        /// Whether the breaker has a synchroscope
        /// </summary>
        [MM_Serializable_Target(MM_Serializable_Target.enumTargetType.TypeCollection)]
        public bool HasSynchroscope = false;
        #endregion

        #region Initialization
        /// <summary>
        /// Initialize a blank breaker
        /// </summary>
        public MM_Breaker()
            : base()
        {
            this.ElemType = MM_Overall_Display.FindElementType("Breaker");
        }

        /// <summary>
        /// Initialize a breaker from XML
        /// </summary>
        /// <param name="BaseElement"></param>
        public MM_Breaker(XmlElement BaseElement)
            : base(BaseElement)
        {
            this.ElemType = MM_Overall_Display.FindElementType("Breaker");
        }

        /// <summary>
        /// Initialize a breaker from XML
        /// </summary>
        /// <param name="BaseElement"></param>
        public MM_Breaker(DbDataReader BaseElement)
            : base(BaseElement)
        {
            this.ElemType = MM_Overall_Display.FindElementType("Breaker");
        }
        #endregion
    }
}
